<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            width: 500px;
            height: 400px;
            border: 1px solid red;
            margin: 0 auto;
            /*设置弹性盒*/
            display: flex;
            /*更改主轴方向 默认row（水平） column（垂直）*/
           /* flex-direction: row;*/
            /*wrap换行*/
            /*flex-wrap: wrap;*/
            /*flex-direction和flex-wrap一起用flex-flow表示*/
            /*flex-flow: column nowrap;*/
            /* justify-content: center;
            align-items: center; */
        }

        .child {
            /*width: 100px;*/
            flex: 1;
            height: 60px;
            color: white;
        }
        .second{
            flex: 2;
        }
    </style>
</head>

<body>
    <!--仿网易云-->
    <div class="parent">
        <div class="child" style="background-color: red;">弹性元素1</div>
        <div class="child second" style="background-color: green;">弹性元素2</div>
        <div class="child" style="background-color: blue;">弹性元素3</div>
        <!-- <div class="child" style="background-color: red;">弹性元素1</div>
        <div class="child" style="background-color: green;">弹性元素2</div>
        <div class="child" style="background-color: blue;">弹性元素3</div> -->
    </div>
</body>

</html>